package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 菜单权限表 实体类
 * 表名：sys_permission
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "sys_permission")
public class SysPermission implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键id
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false, length = 32)
    private String id;
    
    /**
     * 父id
     */
    @Column(name = "parent_id", length = 32)
    private String parentId;
    
    /**
     * 菜单标题
     */
    @Column(name = "name", length = 100)
    private String name;
    
    /**
     * 路径
     */
    @Column(name = "url", length = 255)
    private String url;
    
    /**
     * 组件
     */
    @Column(name = "component", length = 255)
    private String component;
    
    /**
     * 组件名字
     */
    @Column(name = "component_name", length = 100)
    private String componentName;
    
    /**
     * 一级菜单跳转地址
     */
    @Column(name = "redirect", length = 255)
    private String redirect;
    
    /**
     * 菜单类型(0:一级菜单; 1:子菜单:2:按钮权限)
     */
    @Column(name = "menu_type")
    private Integer menuType;
    
    /**
     * 菜单权限编码
     */
    @Column(name = "perms", length = 255)
    private String perms;
    
    /**
     * 权限策略1显示2禁用
     * 默认值: 0
     */
    @Column(name = "perms_type", length = 10)
    private String permsType;
    
    /**
     * 菜单排序
     */
    @Column(name = "sort_no")
    private Double sortNo;
    
    /**
     * 聚合子路由: 1是0否
     */
    @Column(name = "always_show")
    private Boolean alwaysShow;
    
    /**
     * 菜单图标
     */
    @Column(name = "icon", length = 100)
    private String icon;
    
    /**
     * 是否路由菜单: 0:不是  1:是（默认值1）
     * 默认值: 1
     */
    @Column(name = "is_route")
    private Boolean isRoute;
    
    /**
     * 是否叶子节点:    1:是   0:不是
     */
    @Column(name = "is_leaf")
    private Boolean isLeaf;
    
    /**
     * 是否缓存该页面:    1:是   0:不是
     */
    @Column(name = "keep_alive")
    private Boolean keepAlive;
    
    /**
     * 是否隐藏路由: 0否,1是
     * 默认值: 0
     */
    @Column(name = "hidden")
    private Integer hidden;
    
    /**
     * 描述
     */
    @Column(name = "description", length = 255)
    private String description;
    
    /**
     * 创建人
     */
    @Column(name = "create_by", length = 32)
    private String createBy;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private java.time.LocalDateTime createTime;
    
    /**
     * 更新人
     */
    @Column(name = "update_by", length = 32)
    private String updateBy;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private java.time.LocalDateTime updateTime;
    
    /**
     * 删除状态 0正常 1已删除
     * 默认值: 0
     */
    @Column(name = "del_flag")
    private Integer delFlag;
    
    /**
     * 是否添加数据权限1是0否
     * 默认值: 0
     */
    @Column(name = "rule_flag")
    private Integer ruleFlag;
    
    /**
     * 按钮权限状态(0无效1有效)
     */
    @Column(name = "status", length = 2)
    private String status;
    
    /**
     * 外链菜单打开方式 0/内部打开 1/外部打开
     */
    @Column(name = "internal_or_external")
    private Boolean internalOrExternal;
    
    @Override
    public String toString() {
        return "SysPermission{" +
            "id=" + id +
            ", parentId=" + parentId +
            ", name=" + name +
            ", url=" + url +
            ", component=" + component +
            ", componentName=" + componentName +
            ", redirect=" + redirect +
            ", menuType=" + menuType +
            ", perms=" + perms +
            ", permsType=" + permsType +
            ", sortNo=" + sortNo +
            ", alwaysShow=" + alwaysShow +
            ", icon=" + icon +
            ", isRoute=" + isRoute +
            ", isLeaf=" + isLeaf +
            ", keepAlive=" + keepAlive +
            ", hidden=" + hidden +
            ", description=" + description +
            ", createBy=" + createBy +
            ", createTime=" + createTime +
            ", updateBy=" + updateBy +
            ", updateTime=" + updateTime +
            ", delFlag=" + delFlag +
            ", ruleFlag=" + ruleFlag +
            ", status=" + status +
            ", internalOrExternal=" + internalOrExternal +
        '}';
    }
} 